import request, {pageService} from '@/utils/request';

export async function query(filters: any, pagination = {current: 1, pageSize: 10}) {
  return await pageService(`/api/BLOCK_NAME_CAMEL_CASE/page`, filters, pagination);
}

export async function add(table: any) {
  return request('/api/BLOCK_NAME_CAMEL_CASE/add', {
    method: 'POST',
    data: table,
  });
}

export async function edit(table: any) {
  return request('/api/BLOCK_NAME_CAMEL_CASE/update', {
    method: 'POST',
    data: table,
  });
}

export async function remove(table: any) {
  return request('/api/BLOCK_NAME_CAMEL_CASE/remove', {
    method: 'POST',
    data: table,
  });
}
